-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fixing multiproject handling in TransportUpdateDataStreamMappingsAction #130247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pinging @elastic/es-data-management (Team:Data Management) |
| ); | ||
| return; | ||
| } | ||
| ProjectId projectId = projectResolver.getProjectId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pretty small nit, but we usually prefer to resolve the project ID only once, to avoid any confusion whatsoever (and to save a thread context lookup, although that's pretty minor).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm only getting the project ID once, right? Where is the other time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I meant "using the project resolver", as the project resolver is getting the project ID from thread context. I'm referring to projectResolver.getProjectMetadata(state) above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok. I've changed that now. I never thought of projectId as something I need to be careful about accessing. It's possible there are other places where I'm accessing it frequently.
.../main/java/org/elasticsearch/datastreams/action/TransportUpdateDataStreamMappingsAction.java
Outdated
Show resolved
Hide resolved
nielsbauman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the iterations, Keith!
This addresses a couple of bugs in multiproject handling that were raised here: #130042 (comment)